package cn.iocoder.yudao.module.member.dal.mysql.usergastemplaterelation;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.member.dal.dataobject.usergastemplaterelation.UserGasTemplateRelationDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.member.controller.admin.usergastemplaterelation.vo.*;

/**
 * 燃气户与安检模板关系 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface UserGasTemplateRelationMapper extends BaseMapperX<UserGasTemplateRelationDO> {

    default PageResult<UserGasTemplateRelationDO> selectPage(UserGasTemplateRelationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<UserGasTemplateRelationDO>()
                .eqIfPresent(UserGasTemplateRelationDO::getCrmMemberUserId, reqVO.getCrmMemberUserId())
                .eqIfPresent(UserGasTemplateRelationDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(UserGasTemplateRelationDO::getCheckStartTime, reqVO.getCheckStartTime())
                .betweenIfPresent(UserGasTemplateRelationDO::getCheckEntTime, reqVO.getCheckEntTime())
                .betweenIfPresent(UserGasTemplateRelationDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserGasTemplateRelationDO::getId));
    }

}